<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="/static/item/scss/shop.css"/>
    <link rel="stylesheet" type="text/css" href="/static/item/scss/main.css"/>
    <link rel="stylesheet" href="/static/item/scss/header.css"/>
    <link rel="stylesheet" type="text/css" href="/static/item/bootstrap/css/bootstrap.css"/>
</head>
<body>
<div id="max">

    <header>
        <div class="min">
            <ul class="header_ul_left">
                <li class="glyphicon glyphicon-home" style="width: 91px"><a href="http://gulimall.com" class="aa">首页</a></li>
                <li class="glyphicon glyphicon-map-marker"><a href="javascript:;">北京</a>
                    <ol id="beijing">
                        <li style="background: red;"><a href="javascript:;" style="color: white;">北京</a></li>
                        <li><a href="javascript:;">上海</a></li>
                        <li><a href="javascript:;">天津</a></li>
                        <li><a href="javascript:;">重庆</a></li>
                        <li><a href="javascript:;">河北</a></li>
                        <li><a href="javascript:;">山西</a></li>
                        <li><a href="javascript:;">河南</a></li>
                        <li><a href="javascript:;">辽宁</a></li>
                        <li><a href="javascript:;">吉林</a></li>
                        <li><a href="javascript:;">黑龙江</a></li>
                        <li><a href="javascript:;">内蒙古</a></li>
                        <li><a href="javascript:;">江苏</a></li>
                        <li><a href="javascript:;">山东</a></li>
                        <li><a href="javascript:;">安徽</a></li>
                        <li><a href="javascript:;">浙江</a></li>
                        <li><a href="javascript:;">福建</a></li>
                        <li><a href="javascript:;">湖北</a></li>
                        <li><a href="javascript:;">湖南</a></li>
                        <li><a href="javascript:;">广东</a></li>
                        <li><a href="javascript:;">广西</a></li>
                        <li><a href="javascript:;">江西</a></li>
                        <li><a href="javascript:;">四川</a></li>
                        <li><a href="javascript:;">海南</a></li>
                        <li><a href="javascript:;">贵州</a></li>
                        <li><a href="javascript:;">云南</a></li>
                        <li><a href="javascript:;">西藏</a></li>
                        <li><a href="javascript:;">陕西</a></li>
                        <li><a href="javascript:;">甘肃</a></li>
                        <li><a href="javascript:;">青海</a></li>
                        <li><a href="javascript:;">宁夏</a></li>
                        <li><a href="javascript:;">新疆</a></li>
                        <li><a href="javascript:;">港澳</a></li>
                        <li><a href="javascript:;">台湾</a></li>
                        <li><a href="javascript:;">钓鱼岛</a></li>
                        <li><a href="javascript:;">海外</a></li>
                    </ol>
                </li>
            </ul>
            <ul class="header_ul_right">
                <li style="border: 0;" th:if="${session.loginUser == null}">
                    <a href="http://auth.gulimall.com/login.html" class="aa" >你好，请登录</a>
                </li>
                <li style="border: 0;" th:if="${session.loginUser != null}">
                    <a href="">
                        [[${session.loginUser.nickname == null? '欢迎' : session.loginUser.nickname}]]
                    </a>
                </li>
                <li th:if="${session.loginUser == null}">
                    <a href="" style="color: red;">免费注册</a> |
                </li>
                <li><a href="http://order.gulimall.com/list.html" class="aa">我的订单</a> |</li>
            </ul>
        </div>
    </header>
    <nav>
        <div class="nav_min">
            <div class="nav_top">
                <div class="nav_top_one"><a href="http://gulimall.com"><img src="/static/item/img/logo1.jpg"/></a></div>
                <div class="nav_top_two"><input type="text"/>
                    <button>搜索</button>
                </div>
                <div class="nav_top_three"><a href="../JD_Shop/One_JDshop.html">我的购物车</a><span class="glyphicon glyphicon-shopping-cart"></span>
                    <div class="nav_top_three_1">
                        <img src="/static/item/img/44.png"/>购物车还没有商品，赶紧选购吧！
                    </div>
                </div>
            </div>
            <div class="nav_down">
                <ul class="nav_down_ul">
                    <li class="nav_down_ul_1" style="width: 24%;float: left;"><a href="javascript:;">全部商品分类</a>

                    </li>

                </ul>
            </div>
        </div>
    </nav>

</div>


<div class="crumb-wrap">
    <div class="w">


    </div>
</div>
<div class="Shop">
    <div class="box">
        <div class="box-one ">
            <div class="boxx">

                <div class="imgbox">
                    <div class="probox">
                        <img class="img1" alt=""  th:src="${item.info.skuDefaultImg}">
                        <div class="hoverbox"></div>
                    </div>
                    <div class="showbox">
                        <img class="img1" alt="" th:src="${item.info.skuDefaultImg}">
                    </div>
                </div>

                <div class="box-lh">

                    <div class="box-lh-one">
                        <ul>
                            <li th:each="image : ${item.images}" th:if="${!#strings.isEmpty(image.imgUrl)}"><img th:src="${image.imgUrl}"/></li>

                        </ul>
                    </div>
                    <div id="left">
                        <
                    </div>
                    <div id="right">
                        >
                    </div>

                </div>

                <div class="boxx-one">
                    <ul>
                        <li>
                            <span>
                                <img src="/static/item/img/b769782fe4ecca40913ad375a71cb92d.png" alt="">
                            </span>
                            <span>
                                <img src="/static/item/img/9224fcea62bfff479a6712ba3a6b47cc.png" alt="">
                                对比
                            </span>
                        </li>
                        <li>

                        </li>
                    </ul>
                </div>

            </div>
            <div class="box-two">
                <div class="box-name" th:text="${item.info.skuTitle}">
                    华为 HUAWEI Mate 10 6GB+128GB 亮黑色 移动联通电信4G手机 双卡双待
                </div>
                <div class="box-hide" th:text="${item.info.skuSubtitle}">预定用户预计11月30日左右发货！麒麟970芯片！AI智能拍照！
                    <a href="#"><u>华为 HUAWEI Mate 10 Pro 10:00 限时限量抢购！</u></a>
                </div>

                <div class="box-yuyue">
                    <div class="yuyue-one">
                        <img src="/static/item/img/7270ffc3baecdd448958f9f5e69cf60f.png" alt="">
                        热卖促销中
                    </div>
                    <div class="yuyue-two">
                        <ul>
                            <li>
                                <img src="/static/item/img/f64963b63d6e5849977ddd6afddc1db5.png" alt="">
                                <span>18990</span>人预约
                            </li>
                            <li>
                                <img src="/static/item/img/36860afb69afa241beeb33ae86678093.png" alt="">
                                <span id="timer"></span>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="box-summary clear">
                    <ul>
                        <li>惊喜价</li>
                        <li>
                            <span>￥</span>
                            <span th:text="${#numbers.formatDecimal(item.info.price,3,2)}">4499.00</span>
                        </li>
                        <li style="color: red" th:if="${item.secKillInfoVo != null}">
                            <span th:if="${#dates.createNow().getTime() < item.secKillInfoVo.startTime}">
                                商品预计在[[${#dates.format(new java.util.Date(item.secKillInfoVo.startTime),'yyyy-MM-dd HH:mm:ss')}]]进行秒杀
                            </span>

                            <span th:if="${#dates.createNow().getTime() >= item.secKillInfoVo.startTime && #dates.createNow().getTime() <= item.secKillInfoVo.endTime}">
                                秒杀价格：[[${#numbers.formatDecimal(item.secKillInfoVo.seckillPrice,1,2)}]]
                            </span>

                        </li>
                        <li>
                            <a href="">
                                预约说明
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="box-wrap clear">
                    <div class="box-wrap-one clear">
                        <ul>
                            <li>增值业务</li>
                            <li><img src="/static/item/img/90a6fa41d0d46b4fb0ff6907ca17c478.png" alt=""></li>
                            <li><img src="/static/item/img/2e19336b961586468ef36dc9f7199d4f.png" alt=""></li>
                            <li><img src="/static/item/img/1f80c3d6fabfd3418e54b005312c00b5.png" alt=""></li>
                        </ul>
                    </div>
                </div>

                <div class="box-stock">
                    <ul class="box-ul">
                        <li>配送至</li>
                        <!--<li>库存:</li>-->
                        <li class="box-stock-li">
                            <div class="box-stock-one">
                                北京朝阳区管庄
                                <img src="/static/itme/img/4a79b87a68623d4e8a73aff3e25fa99b.png" alt="">
                            </div>
                            <div class="box-stock-two">
                                <dl>
                                    <dt>
                                        <a>选择新地址</a>
                                        <img src="/static/item/img/4a79b87a68623d4e8a73aff3e25fa99b.png" alt="">
                                    </dt>
                                    <dd>
                                        <div class="box-stock-dd">
                                            <div class="box-stock-top">
                                                <div class="box-stock-div">北京</div>
                                                <div class="box-stock-div">朝阳区</div>
                                                <div class="box-stock-div">管庄</div>
                                            </div>
                                            <div class="box-stock-fot">
                                                <div class="box-stock-con" style="display: none;">
                                                    <ul>
                                                        <li>北京</li>
                                                        <li>上海</li>
                                                        <li>天津</li>
                                                        <li>重庆</li>
                                                    </ul>
                                                </div>
                                                <div class="box-stock-con">
                                                    <ul>
                                                        <li>朝阳区</li>
                                                        <li>海淀区</li>
                                                        <li>东城区</li>
                                                        <li>西城区</li>
                                                    </ul>
                                                </div>
                                                <div class="box-stock-con">
                                                    <ul>
                                                        <li>4环到5环以内</li>
                                                        <li>管庄</li>
                                                        <li>北苑</li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </dd>
                                </dl>
                            </div>

                        </li>
                        <li>
                            <span th:text="${item.hasStock? '有货':'无货'}">无货</span>
                        </li>

                    </ul>
                </div>
                <div class="box-supply">
                    <ul class="box-ul">
                        <li></li>
                        <li>
                            由<span>谷粒商城</span> 发货，并提供售后服务
                        </li>
                    </ul>
                </div>
                <div class="box-stock">
                    <ul class="box-ul">
                        <li>重 量:</li>
                        <li class="box-stock-li">
                            <div class="box-stock-one">
                            </div>
                        </li>
                        <li>10 kg</li>
                    </ul>
                </div>

                <div class="box-attr-3">
                    <div class="box-attr clear" th:each="saleAttr : ${item.saleAttrs}">
                        <dl>
                            <dt >选择[[${saleAttr.attrName}]]</dt>
                            <dd th:each="vals : ${saleAttr.attrValues}">
                                <a
                                   th:attr="skus=${vals.skuIds},class=${#lists.contains(#strings.listSplit(vals.skuIds, ','), item.info.skuId.toString()) ? 'sku_attr_value checked' : 'sku_attr_value'}">
                                    [[${vals.attrValue}]]
                                </a>
                            </dd>
                        </dl>
                    </div>

                </div>

                <div class="box-btns clear">
                    <div class="box-btns-one">
                        <form id="itemForm" action="http://cart.gmall.com:8087/addToCart" method="post">
                            <input type="text" name="num" id="numInput" value="1"/>
                            <input type="hidden" name="skuId"/>

                            <div class="box-btns-one1">

                                <div>
                                    <button type="button" id="jia">
                                        +
                                    </button>
                                </div>
                                <div>
                                    <button type="button" id="jian">
                                        -
                                    </button>
                                </div>

                            </div>
                        </form>
                    </div>

                    <div id="addToCart" th:if="${item.secKillInfoVo == null || (#dates.createNow().getTime() < item.secKillInfoVo.startTime || #dates.createNow().getTime() > item.secKillInfoVo.endTime)}"
                         th:attr="skuId=${item.info.skuId}" style="cursor:pointer;" class="box-btns-two">
                        <a href="#">
                            加入购物车
                        </a>
                    </div>

                    <div id="secKillA" th:if="${item.secKillInfoVo != null && (#dates.createNow().getTime() >= item.secKillInfoVo.startTime && #dates.createNow().getTime() <= item.secKillInfoVo.endTime)}"
                         th:attr="skuId=${item.info.skuId},sessionId=${item.secKillInfoVo.promotionSessionId},code=${item.secKillInfoVo.randomCode}" style="cursor:pointer;" class="box-btns-two">
                        <a href="#">
                            立即抢购
                        </a>
                    </div>


                </div>


            </div>

        </div>
    </div>


    <div class="ShopXiangqing">
        <div class="allLeft">
            <!--火热预约-->
            <div class="huoreyuyue">
                <h3>火热预约</h3>
            </div>
            <div class="dangeshopxingqing">
                <ul class="shopdange">
                    <li>
                        <a href="##"><img src="/static/item/img/5a0afeddNb34732af.jpg"/></a>
                        <p>
                            <a href="##">OPPO R11s Plus 双卡双待全面屏拍照手机香槟色 全网通(6G RAM+64G ROM)标配</a>
                        </p>
                        <p><strong class="J-p-20015341974">￥3699.00</strong></p>
                    </li>
                    <li>
                        <a href="##"><img src="/static/item/img/5a12873eN41754123.jpg"/></a>
                        <p>
                            <a target="_blank" title="詹姆士（GEMRY） R19plus全网通4G 智能手机 双卡双待 6+128GB 鳄鱼纹雅致版（新品预约）" href="/item.html.bak/item.jd.com/20348283521.html">詹姆士（GEMRY） R19plus全网通4G 智能手机 双卡双待 6+128GB 鳄鱼纹雅致版（新品预约）</a>
                        </p>
                        <p><strong class="J-p-20348283521">￥13999.00</strong></p>
                    </li>
                    <li>
                        <a href="##"><img src="/static/item/img/59ec0131Nf239df75.jpg"/></a>
                        <p>
                            <a target="_blank" title="斐纳（TOMEFON） 德国家用无线无绳手持立式充电吸尘器 静音大吸力吸尘器TF-X60" href="/item.html.bak/item.jd.com/16683419775.html">斐纳（TOMEFON） 德国家用无线无绳手持立式充电吸尘器 静音大吸力吸尘器TF-X60</a>
                        </p>
                        <p><strong class="J-p-16683419775">￥1599.00</strong></p>
                    </li>
                    <li>
                        <a href="##"><img src="/static/item/img/59015444N27317512.jpg"/></a>
                        <p>
                            <a target="_blank" title="斐纳（TOMEFON） 扫地机器人德国智能导航规划全自动超薄扫地机器人吸尘器TF-D60 香槟金" href="/item.html.bak/item.jd.com/12187770381.html">斐纳（TOMEFON） 扫地机器人德国智能导航规划全自动超薄扫地机器人吸尘器TF-D60 香槟金</a>
                        </p>
                        <p><strong class="J-p-12187770381">￥2599.00</strong></p>
                    </li>
                </ul>
            </div>
            <!--看了又看-->
            <div class="huoreyuyue">
                <h3>看了又看</h3>
            </div>
            <div class="dangeshopxingqing">
                <ul class="shopdange">
                    <li>
                        <a href="##"><img src="/static/item/img/59e55e01N369f98f2.jpg"/></a>
                        <p>
                            <a target="_blank" title="华为（HUAWEI） 华为 Mate10 4G手机  双卡双待 亮黑色 全网通(6GB RAM+128GB ROM)" href="/item.html.bak/item.jd.com/17931625443.html">华为（HUAWEI） 华为 Mate10 4G手机 双卡双待 亮黑色 全网通(6GB RAM+128GB ROM)</a>
                        <p><strong class="J-p-17931625443">￥4766.00</strong></p>
                    </li>
                    <li>
                        <a href="##"><img src="/static/item/img/584fcc3eNdb0ab94c.jpg"/></a>
                        <p>
                            <a target="_blank" title="华为 Mate 9 Pro 6GB+128GB版 琥珀金 移动联通电信4G手机 双卡双待" href="/item.html.bak/item.jd.com/3749093.html">华为 Mate 9 Pro 6GB+128GB版 琥珀金 移动联通电信4G手机 双卡双待</a>
                        </p>
                        <p><strong class="J-p-3749093">￥4899.00</strong></p>
                    </li>
                    <li>
                        <!--shopjieshao-->
                        <a href="##"><img src="/static/item/img/59eb0df9Nd66d7585.jpg"/></a>
                        <p>
                            <a target="_blank" title="华为（HUAWEI） 华为 Mate10 手机 亮黑色 全网通(4+64G)标准版" href="/item.html.bak/item.jd.com/12306211773.html">华为（HUAWEI） 华为 Mate10 手机 亮黑色 全网通(4+64G)标准版</a>
                        </p>
                        <p><strong class="J-p-12306211773">￥4088.00</strong></p>
                    </li>
                    <li>
                        <a href="##"><img src="/static/item/img/5a002ba3N126c2f73.jpg"/></a>
                        <p>
                            <a target="_blank" title="斐纳（TOMEFON） 扫地机器人德国智能导航规划全自动超薄扫地机器人吸尘器TF-D60 香槟金" href="/item.html.bak/item.jd.com/12187770381.html">斐纳（TOMEFON） 扫地机器人德国智能导航规划全自动超薄扫地机器人吸尘器TF-D60 香槟金</a>
                        </p>
                        <p><strong class="J-p-12187770381">￥2599.00</strong></p>
                    </li>
                </ul>
                <img src="/static/item/img/5a084a1aNa1aa0a71.jpg"/>
            </div>
        </div>
        <!--商品介绍-->
        <div class="allquanbushop">
            <ul class="shopjieshao">
                <li class="jieshoa" style="background: #e4393c;">
                    <a href="##" style="color: white;">商品介绍</a>
                </li>
                <li class="baozhuang">
                    <a href="##">规格与包装</a>
                </li>
                <li class="baozhang">
                    <a href="##">售后保障</a>
                </li>
                <li class="pingjia">
                    <a href="##">商品评价(4万+)</a>
                </li>
                <li class="shuoming">
                    <a href="##">预约说明</a>
                </li>

            </ul>

            <ul class="shopjieshaos posi" style="display: none;">
                <li class="jieshoa" style="background: #e4393c;">
                    <a href="#li1" style="color: white;">商品介绍</a>
                </li>
                <li class="baozhuang">
                    <a href="#li2">规格与包装</a>
                </li>
                <li class="baozhang">
                    <a href="#li3">售后保障</a>
                </li>
                <li class="pingjia">
                    <a href="#li4">商品评价(4万+)</a>
                </li>
                <li class="shuoming">
                    <a href="#li5">预约说明</a>
                </li>
            </ul>

            <!--商品详情-->
            <div class="huawei">
                <ul class="xuanxiangka">
                    <li class="jieshoa actives" id="li1">
                        <div class="shanpinsssss">
                            <p>
                                <a href="#">品牌:华为（HUAWEI）</a>
                            </p>
                            <table>
                                <tr>
                                    <td>
                                        <a href="##">商品名称：华为Mate 10</a>
                                    </td>
                                    <td>
                                        <a href="##">商品毛重：0.58kg</a>
                                    </td>
                                    <td>
                                        <a href="##">商品编号：5544038</a>
                                    </td>
                                    <td>
                                        <a href="##">商品产地：中国大陆</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <a href="##">系统：安卓（Android）</a>
                                    </td>
                                    <td>
                                        <a href="##">前置摄像头像素：800万-1599万</a>
                                    </td>
                                    <td>
                                        <a href="##">后置摄像头像素：2000万及以上，1200万-1999万</a>
                                    </td>
                                    <td>
                                        <a href="##">机身内存：128GB</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        <a href="##">全面屏，双卡双待，指纹识别，Type-C，VoLTE，2K屏，拍照神器，支持NFC，商务手机，安全手机，分辨率10</a>
                                    </td>
                                </tr>
                            </table>
                            <img class="xiaoguo" th:src="${despImg}" th:each="despImg : ${#strings.listSplit(item.desp.decript,',')}"/>
                            <div class="guiGebox guiGebox1">
                                <div class="guiGe" th:each="guige : ${item.attrGroups}">
                                    <h3 th:text="${guige.groupName}">主体</h3>
                                    <dl>
                                        <dt>品牌</dt>
                                        <dd>华为(HUAWEI)</dd>
                                        <dt>型号</dt>
                                        <dd class="Ptable-tips">
                                            <a href="#"><i>？</i></a>
                                        </dd>
                                        <dd>ALP-AL00</dd>
                                        <dt>入网型号</dt>
                                        <dd class="Ptable-tips">
                                            <a href="#"><i>？</i></a>
                                        </dd>
                                        <dd>ALP-AL00</dd>
                                        <dt>上市年份</dt>
                                        <dd>2017年</dd>
                                        <dt>上市时间</dt>
                                        <dd>10月</dd>
                                    </dl>
                                </div>

                                <div class="package-list">
                                    <h3>包装清单</h3>
                                    <p>手机（含内置电池） X 1、5A大电流华为SuperCharge充电器X 1、5A USB数据线 X 1、半入耳式线控耳机 X 1、快速指南X 1、三包凭证 X 1、取卡针 X 1、保护壳 X 1</p>
                                </div>
                            </div>
                        </div>
                    </li>
                    <li class="baozhuang actives" id="li2">
                        <div class="guiGebox">
                            <div class="guiGe" th:each="guige : ${item.attrGroups}">
                                <h3 th:text="${guige.groupName}">主体</h3>
                                <dl>
                                    <div th:each="attr : ${guige.attrs}">
                                        <dt th:text="${attr.attrName}">品牌</dt>
                                        <dd th:text="${attr.attrValue}">华为(HUAWEI)</dd>
                                    </div>

                                </dl>
                            </div>

                            <div class="package-list">
                                <h3>包装清单</h3>
                                <p>手机（含内置电池） X 1、5A大电流华为SuperCharge充电器X 1、5A USB数据线 X 1、半入耳式线控耳机 X 1、快速指南X 1、三包凭证 X 1、取卡针 X 1、保护壳 X 1</p>
                            </div>
                        </div>
                    </li>
                    <!--包装-->
                    <li class="baozhang actives" id="li3">
                        <div class="oBox">
                            <div class="shuoHou">
                                <div class="baoZhang">
                                    <h2>售后保障</h2>
                                </div>
                            </div>
                            <!--厂家服务-->

                            <div class="lianBao">

                            </div>

                        </div>


                    </li>
                    <!--评价-->
                    <li class="PINgjia actives" id="li4">

                </ul>
            </div>
        </div>
    </div>
</div>



<div class="Fixedbian">
    <ul>
        <li class="li1"><a class="aaa" href="##">顶部</a></li>
    </ul>
</div>
<div class="gouwuchexiaguo">
    <img src="/static/item/img/44.png"/>
    <span>购物车还没有商品，赶紧选购吧！</span>
</div>
</body>

<script src="/static/item/js/jquery1.9.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/item/js/js.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

    // function addToCart(obj) {
    //     var canClick = $(obj).attr("canClick");
    //     if (canClick == '0') {
    //         return;
    //     }
    //     $("#itemForm").submit();
    // }

    function switchSkuId() {
        // 被选中属性
        var checkDivs = $(".redborder div");
        var valueIds = "";
        // 拼接成属性值串
        for (var i = 0; i < checkDivs.length; i++) {
            var saleAttrValueDiv = checkDivs.eq(i);
            if (i > 0) {
                valueIds = valueIds + "|";
            }
            valueIds = valueIds + saleAttrValueDiv.attr("value");
        }
        //页面上的hashjson
        var valuesSku = $("#valuesSku").attr("value");
        var valuesSkuJson = JSON.parse(valuesSku);

        // 看看hash有没有
        var skuId = valuesSkuJson[valueIds];
        // 当前sku
        var skuIdSelf = $("#skuId").val();

        // 判断是否跳转
        if (skuId) {
            if (skuId == skuIdSelf) {
                $("#cartBtn").attr("class", "box-btns-two");
            } else {
                window.location.href = "/" + skuId + ".html";
            }
        } else {
            $("#cartBtn").attr("class", "box-btns-two-off");
        }
    }
</script>



<!--  自写js -->
<script>
    $(".sku_attr_value").click(function () {

        var skus = new Array();

        // 给点击的元素加上自定义属性，为了识别已被点击了
        $(this).addClass("clicked");
        // 移除点击元素同行的checked  为了方便获取另外选中的内容
        $(this).parent().parent().find(".sku_attr_value").removeClass("checked");

        // 1、获取当前skus组合
        var curr = $(this).attr("skus").split(",");
        skus.push(curr);

        // 2、获取另外一个选中的组合
        $("a[class='sku_attr_value checked']").each(function () {
            skus.push($(this).attr("skus").split(","));
        });

        // console.log(skus);
        // 3、取出交集

        var filterEle = skus[0];
        for (var i=1; i<skus.length; i++){
            filterEle = $(filterEle).filter(skus[i])
        }
        console.log(filterEle)
        // 4、跳转
        location.href = "http://item.gulimall.com/" + filterEle[0] + ".html";
    });

    $(function () {

        $(".sku_attr_value").parent().css({"border":"solid 1px #ccc"});
        $("a[class='sku_attr_value checked']").parent().css({"border":"solid 1px red"});

    });

    $("#addToCart").click(function () {
        var skuId = $(this).attr("skuId");
        var num = $("#numInput").val();
        location.href = "http://cart.gulimall.com/addToCart?skuId=" + skuId + "&num=" + num;

        return false;
    });

//    立即秒杀商品
    $("#secKillA").click(function () {

        // 1、判断是否已登录 简单限流
        var isLogin = [[${session.loginUser != null}]];

        if (isLogin) {
            var killId = $(this).attr("sessionid") + "_" + $(this).attr("skuid");
            var key = $(this).attr("code");
            var num = $("#numInput").val();

            location.href = "http://seckill.gulimall.com/kill?killId=" + killId + "&key=" + key + "&num=" + num;
        } else {
            alert("登录后才可以参与秒杀活动！");
        }

        return false;
    });

</script>

</html>
